﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="FromEbs.aspx.cs" Inherits="Portal.FromEbs" %>

<base target="_self" />
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>
    <script src="js/jquery.js" type="text/javascript"></script>
    <script type="text/javascript" language="javascript">

        $().ready(function () {
            $("span[id*='lbCarnumber']").each(function () {
                $(this).click(function () {
                    var a = $(this).parent().find("[id*='htbh']").val();
                    var b = $(this).parent().find("[id*='gysmc']").val();
                    var c = $(this).parent().find("[id*='note']").val();
                    var d = $(this).parent().find("[id*='htje']").val();
                    var e = $(this).parent().find("[id*='htsl']").val();
                    var f = $(this).parent().find("[id*='rksl']").val();
                    var g = $(this).parent().find("[id*='ykpje']").val();
                    var h = $(this).parent().find("[id*='yfje']").val();
                    var ReturnJson = "";
                    ReturnJson = "{'htbh':'" + a + "','gysmc':'" + b + "','note':'" + c + "','htje':'" + d + "','htsl':'" + e + "','rksl':'" + f + "','ykpje':'" + g + "','yfje':'" + h + "'}";

                    window.returnValue = ReturnJson;

                    window.close();
                });
            });
        });
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <table style="margin: 1% 0 0 10%">
            <tr>
                <td style="text-align: center; font-size: 12;">
                    合同编号：
                </td>
                <td>
                    <asp:TextBox ID="ContractNo" runat="server"></asp:TextBox>
                </td>
                <td style="text-align: center; font-size: 12;">
                    <asp:Button ID="Button1" Height="7" Width="20" runat="server" CssClass="btn" Text="查询"
                        OnClick="Button1_Click" />
                </td>
            </tr>
        </table>
    </div>
    <div>
        <table class="table table-hover table-bordered table-condensed listTable" style="margin: 1% 1% 0 1%;">
            <tr class="banner">
                <th style="font-size: 12; font-weight: bold; width: 13%;">
                    合同编号
                </th>
                <th style="font-size: 12; font-weight: bold; width: 20%">
                    供应商名称
                </th>
                <th style="font-size: 12; font-weight: bold; width: 13%">
                    内容
                </th>
                <th style="font-size: 12; font-weight: bold; width: 9%">
                    合同金额
                </th>
                <th style="font-size: 12; font-weight: bold; width: 9%">
                    合同数量
                </th>
                <th style="font-size: 12; font-weight: bold; width: 9%">
                    入库数量
                </th>
                <th style="font-size: 12; font-weight: bold; width: 12%">
                    已开票金额
                </th>
                <th style="font-size: 12; font-weight: bold; width: 15%">
                    已付金额
                </th>
            </tr>
            <asp:Repeater ID="RepeaterItemInfo" runat="server">
                <ItemTemplate>
                    <tr>
                        <td style="text-align: center; font-size: 12;">
                            <%#Eval("htbh")%>
                        </td>
                        <td style="text-align: center; font-size: 12;">
                            <%#Eval("gysmc")%>
                        </td>
                        <td style="text-align: center; font-size: 12;">
                            <%#Eval("note")%>
                        </td>
                        <td style="text-align: center; font-size: 12;">
                            <%#Eval("htje")%>
                        </td>
                        <td style="text-align: center; font-size: 12;">
                            <%#Eval("htsl")%>
                        </td>
                        <td style="text-align: center; font-size: 12;">
                            <%#Eval("rksl")%>
                        </td>
                        <td style="text-align: center; font-size: 12;">
                            <%#Eval("ykpje")%>
                        </td>
                        <td style="text-align: center; font-size: 12;">
                            <%#Eval("yfje")%>
                        </td>
                        <td style="text-align: center; font-size: 12;">
                            <asp:Label ID="lbCarnumber" runat="server" Text="选择" Style="text-decoration: underline;
                                color: Blue; cursor: pointer;"></asp:Label>
                            <asp:TextBox Style="display: none;" ID="htbh" runat="server" Text='<%#Eval("htbh")%>'></asp:TextBox>
                            <asp:TextBox Style="display: none;" ID="gysmc" runat="server" Text='<%#Eval("gysmc")%>'></asp:TextBox>
                            <asp:TextBox Style="display: none;" ID="note" runat="server" Text='<%#Eval("note")%>'></asp:TextBox>
                            <asp:TextBox Style="display: none;" ID="htje" runat="server" Text='<%#Eval("htje")%>'></asp:TextBox>
                            <asp:TextBox Style="display: none;" ID="htsl" runat="server" Text='<%#Eval("htsl")%>'></asp:TextBox>
                            <asp:TextBox Style="display: none;" ID="rksl" runat="server" Text='<%#Eval("rksl")%>'></asp:TextBox>
                            <asp:TextBox Style="display: none;" ID="ykpje" runat="server" Text='<%#Eval("ykpje")%>'></asp:TextBox>
                            <asp:TextBox Style="display: none;" ID="yfje" runat="server" Text='<%#Eval("yfje")%>'></asp:TextBox>
                        </td>
                    </tr>
                </ItemTemplate>
            </asp:Repeater>
        </table>
    </div>
    </form>
</body>
</html>
